<script language="JavaScript">
//<!--
function f_save2(){
	var isPass = true;
	var checkValues = ["stock_yellowalertpec", "stock_redalertpec", "stock_ctrlpec", 
					   "consume_yellowalertpec", "consume_redalertpec", "consume_ctrlpec"];
	for(var i = 0; i < checkValues.length; i++){
		var obj = document.all("sj_ymtarget."+checkValues[i]);
		if (obj.value && parseFloat(obj.value) > 100.0){
			alert(document.all("label_sj_ymtarget."+checkValues[i]).innerHTML.replace('*', '')+'<eam:message key="text.sj.err.value" />');
			isPass = false;
			obj.focus();
		}
	}
	if (isPass) f_save();
}

function f_showRemainValue(){
	var keyId = document.all("sj_ymtarget.ymtarget_id").value;
	if (keyId.length == 0) {
		alert("<eam:message key="common.text.noselrecord" />");
		return ;
	}
	document.forms(formName).ActionType.value = "view";
	document.forms(formName).action = "<%=CONTEXTPATH%>/commonAction.do?keyId=" + keyId;
	document.forms(formName).submit();
}
//-->
</script>